package jy.game;

import jy.game.components.role.JyRole;

public class AttributeFinalHelper {
    // Token: 0x040003D6 RID: 982
    private JyRole owner;

    // Token: 0x060004AF RID: 1199 RVA: 0x000047B9 File Offset: 0x000029B9
    public AttributeFinalHelper(JyRole Owner) {
        this.owner = Owner;
    }

    // Token: 0x17000106 RID: 262
    public int get(String key) {

        int num = this.owner.Attributes.get(key) + this.owner.GetAdditionAttribute(key);
        if (key == "jianfa") {
            if (this.owner.HasTalent("浪子剑客")) {
                num = (int) (num * 1.2);
            }
            if (this.owner.HasTalent("剑法增益")) {
                num = (int) (num * 1.05);
            }
            return num;
        }
        if (key == "quanzhang") {
            if (this.owner.HasTalent("神拳无敌")) {
                num = (int) (num * 1.1);
            }
            if (this.owner.HasTalent("拳掌增益")) {
                num = (int) (num * 1.05);
            }
            return num;
        }
        if (key == "daofa" && this.owner.HasTalent("刀法增益")) {
            return (int) (num * 1.05);
        }
        if (key == "qimen" && this.owner.HasTalent("奇门增益")) {
            return (int) (num * 1.05);
        }
        return num;

    }
}

